Created
April 20, 2018 19:36
-
-
Save achuvm/a085121a46fe8d9f6e0c9a20c5ef5dd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/Podfile b/ios/Podfile | |
new file mode 100644 | |
index 0000000..44e11ea | |
--- /dev/null | |
+++ b/ios/Podfile | |
@@ -0,0 +1,6 @@ | |
+platform :ios, '9.3' | |
+target 'ViroSample' do | |
+ use_frameworks! | |
+ pod 'ViroReact', :path => '../node_modules/react-viro/ios/' | |
+ pod 'ViroKit', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/' | |
+end | |
diff --git a/ios/ViroSample/Info.plist b/ios/ViroSample/Info.plist | |
index 40e6962..5d2a194 100644 | |
--- a/ios/ViroSample/Info.plist | |
+++ b/ios/ViroSample/Info.plist | |
@@ -24,6 +24,23 @@ | |
<string>1</string> | |
<key>LSRequiresIPhoneOS</key> | |
<true/> | |
+ <key>NSAppTransportSecurity</key> | |
+ <dict> | |
+ <key>NSAllowsArbitraryLoads</key> | |
+ <true/> | |
+ <key>NSExceptionDomains</key> | |
+ <dict> | |
+ <key>localhost</key> | |
+ <dict> | |
+ <key>NSExceptionAllowsInsecureHTTPLoads</key> | |
+ <true/> | |
+ </dict> | |
+ </dict> | |
+ </dict> | |
+ <key>NSCameraUsageDescription</key> | |
+ <string>Camera is used to scan the QR code of your VR headset.</string> | |
+ <key>NSLocationWhenInUseUsageDescription</key> | |
+ <string></string> | |
<key>UILaunchStoryboardName</key> | |
<string>LaunchScreen</string> | |
<key>UIRequiredDeviceCapabilities</key> | |
@@ -38,19 +55,5 @@ | |
</array> | |
<key>UIViewControllerBasedStatusBarAppearance</key> | |
<false/> | |
- <key>NSLocationWhenInUseUsageDescription</key> | |
- <string></string> | |
- <key>NSAppTransportSecurity</key> | |
- <!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ --> | |
- <dict> | |
- <key>NSExceptionDomains</key> | |
- <dict> | |
- <key>localhost</key> | |
- <dict> | |
- <key>NSExceptionAllowsInsecureHTTPLoads</key> | |
- <true/> | |
- </dict> | |
- </dict> | |
- </dict> | |
</dict> | |
</plist> | |
diff --git a/ios/proj_add_shell_script.rb b/ios/proj_add_shell_script.rb | |
new file mode 100644 | |
index 0000000..4cee16c | |
--- /dev/null | |
+++ b/ios/proj_add_shell_script.rb | |
@@ -0,0 +1,21 @@ | |
+require 'xcodeproj' | |
+project_name = ARGV[0] | |
+path_to_project = "#{project_name}.xcodeproj" | |
+project = Xcodeproj::Project.open(path_to_project) | |
+main_target = project.targets.first | |
+phase = main_target.new_shell_script_build_phase("Execute Ngrok") | |
+phase.shell_script = "$SRCROOT/ngrok_launch.sh" | |
+ | |
+ | |
+phaseTwo = main_target.new_shell_script_build_phase("Copy ngrok endpoint") | |
+phaseTwo.shell_script = "DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH\nendpointfile=\"ngrokendpoint.txt\"\nif [[ -e \"$SRCROOT/$endpointfile\" ]]; then\necho \"Ngrok endpoint file found, copying over...\"\ncp \"$SRCROOT/$endpointfile\" \"$DEST/$endpointfile\"\nbreak;\nfi" | |
+ | |
+project.targets.each do |target| | |
+ target.build_configurations.each do |config| | |
+ config.build_settings['ENABLE_BITCODE'] = 'NO' | |
+ config.build_settings['DEAD_CODE_STRIPPING'] = 'YES' | |
+ end | |
+end | |
+ | |
+ | |
+project.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The changes required are as follows:
/ios/Podfile
to includeViroReact
andViroKit
. Then runpod install
.Info.plist
.ENABLE_BITCODE
set toNO
andDEAD_CODE_STRIPPING
set toYES
.