I tried to follow the instruction on here: https://gist.github.com/boopathi/27d21956fefcb5b168fe
The instruction is somewhat dated with respect to how fast new react-native builds are pushed.
I fixed some of the obvious issues in the instruction (change lib.ReactKit.a to libReact.a, etc...).
I was able to compile the swift project and bring up the simulator. However, the red screen of death showed up with the following msg:
Unable to execute JS call: __fbBatchedBridge is undefined
Any insights or general direction to how to create a swift project with react-native would be appreciated.
After looking through multiple ways of creating a swift project, the following method worked for me:
1) Follow the instruction here (use the swift version): https://github.com/davidyaha/react-native/blob/master/docs/EmbeddedAppIOS.md
2) If your build ran into a red screen of death with "Could not connect to development server". Paste the following lines into your Info.plist file under your swift project:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
Detailed discussion of the reasoning is here https://github.com/facebook/react-native/issues/304
The above steps will allow you to see the react-native component in a swift project.
Related
My app using Audiokit is running perfectly without sandbox. But as soon as I enable sandbox in Xcode the app crashes when trying to initialize the mic access.
(The app is on the App Store for iOS, but now I am trying to submit to the Mac Store as a OS X app but I need to enable sandbox)
Has anyone been able to submit a Mac app to the Mac App Store with Audiokit in it?
ERROR: >avae> AVAudioEngine.mm:275: AttachNode: required condition
is false: node != nil
To enable microphone access in App Store sandbox you'll need to add following entitlement:
com.apple.security.device.audio-input
See reference of Sandbox: Enabling Hardware Access
This entitlements file did work for me. But it doesn't cover all the cases.
Please check Apple documentation for more details https://developer.apple.com/library/archive/technotes/tn2312/_index.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.audio-video-bridging</key>
<true/>
<key>com.apple.security.files.bookmarks.document-scope</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.temporary-exception.audio-unit-host</key>
<true/>
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>com.apple.midiserver</string>
<string>com.apple.midiserver.io</string>
</array>
</dict>
RemoveProfile command is not working properly for me.
I am setting the proper profile identifier with below xml
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE plist PUBLIC '-//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'><plist version='1.0'>
<dict>
<key>Command</key>
<dict>
<key>RequestType</key>
<string>RemoveProfile</string>
<key>Identifier</key>
<string>com.apple.mgmt.mdmA3727E23-7914-59A6-FDCE-D79D9B42A209</string>
</dict>
<key>CommandUUID</key>
<string>B733FE25-101E-4959-4FAD-7262D7774169</string>
</dict>
</plist>
Also when I query for profiles installed on device I get this profile installed with same profile identifier.
Can someone guide me whats wrong with the command.
On IPCU, I get the following error:
The profile “com.apple.mgmt.mdmA3727E23-7914-59A6-FDCE-D79D9B42A209” is not managed by MDM.
If I performed an enterprise wipe i.e. remove the main enrollment profile via the same above command, it removes the enrollment as well as all the associated profiles, so why doesn't it allow me to remove individuals?
Two pieces of information:
1) If profile is truely not managed (wasn't installed through MDM), you can't remove it using MDM.
2) I noticed and reported to Apple a bug in which my iOS device lost association between MDM profile and profiles which were installed through MDM. So, you may have seen this bug.
Lately I've been having issues deploying my applications in-house
(enterprise developer program) with reports that some entitlement
values were not the ones specified in the provisioning profile.
I started looking into the issue, and found that, of course, the
values weren't a match:
Contents of the .mobileprovision file:
(as extracted by running security cms -D -i <mobileprovision file>)
<key>application-identifier</key>
<string>M7X5D8MA6U.some.masked.Identifier</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>KNHHJPPHR7.*</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>KNHHJPPHR7.*</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>M7X5D8MA6U.*</string>
</array>
And the entitlements are (as extracted running: codesign -d --entitlements - <app bundle>)
<key>application-identifier</key>
<string>5R678HMG35.some.masked.Identifier</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>5R678HMG35.some.masked.Identifier</string>
</array>
I'm not specifying any entitlements file in my project, and the
mobileprovision file was downloaded fresh from the Portal.
Should I create an Entitlements.plist with those values just to make
the installer happy or is there a less hackish way of solving this?
And more importantly, why is this happening only with some builds of
my app? (Some other builds are fine)
Any other tips on how to solve and/or avoid this problem?
I have already tried the usual suspects: deleting all profiles, recreating profiles, re-downloading the certificate, etc...
Thanks!
What I noted was that I wasn't using a development provisioning profile for that specific app, I was using the team profile generated by Xcode. I took a shot at creating the development profile, and then it fixed itself.
Make sure, if you're not using iCloud, that your Provisioning Profile on the Apple Developer Page doesn't have iCloud enabled.
If so, disable iCloud and download the new generated profile and try again.
Had a pretty similar problem a few weeks back.
This can happen if, while doing a Release build, Xcode decides to use a wildcard provisioning profile.
Even though you go on to choose the correct provisioning profile in Xcode Organizer, when you hit the Distribute… button Xcode invokes xcrun PackageApplication which embeds the provisioning profile in your app and then resigns it. It also very carefully copies the original incorrect entitlements, like App ID Prefix, APN entitlement, gleaned from the wrong provisioning profile, into your new IPA. This will likely fail to install.
I'm not sure why it does this, maybe because not all entitlements come from provisioning profiles.
I am trying to determine how to extract or get programmatically the Custom URL Scheme from a application .ipa file.
Is this possible?
Yes, this is possible. First, unzip the .ipa file. (you can rename it with .zip to do this). Then, inside the .ipa file, you will find there is a Info.plist file. You can parse that file, look for "CFBundleURLSchemes" and you will see first the app id followed by the Custom URL if one is defined for the app.
So I went to iTunes on my mac and looked in my App Library for the "APP IN QUESTION".
I then:
• Right-Clicked on the "APP IN QUESTION" app and selected “Show in Finder”
• then duplicated the "APP IN QUESTION" .ipa file
• Then I renamed the .ipa file to end in .zip instead (saying, yes make it a .zip if necessary)
• Then I unzipped it to a folder
• I opened the Payload Folder
• I right-clicked the “"APP IN QUESTION".app” and selected “Show Package Contents”
• I opened up the “Info.plist” file in a text editor like the free TextWrangler.app
• I searched for “URL” and found the following:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>app-in-question</string>
<string>sslapp-in-question</string>
</array>
</dict>
</array>
I was then able to successfully go to Safari and type in: app-in-question:// and sslapp-in-question:// and was prompted if I wanted to launch the App in Question.
Yes, you can just unzip the ipa (this just a zip file), open the < application >.app and look for the info.plist.
It should contain any custom app URL schemes, if the app supports it.
I was trying to set "Application uses WiFi" property in my application info plist but to my surprise, I was not able to find this property in the info plist.
The XCODE version I am using is 3.2.6 and IOS is 4.3.
What can be wrong here?
You can open your info.plist file as source code and then add this
<key>UIRequiresPersistentWiFi</key>
<true/>
Before the </dict> tag