diff --git a/app/ios/Movix/AppDelegate.h b/app/ios/Movix/AppDelegate.h new file mode 100644 index 0000000..c59b2ef --- /dev/null +++ b/app/ios/Movix/AppDelegate.h @@ -0,0 +1,5 @@ +#import +#import + +@interface AppDelegate : RCTAppDelegate +@end diff --git a/app/ios/Movix/AppDelegate.mm b/app/ios/Movix/AppDelegate.mm new file mode 100644 index 0000000..6c36f80 --- /dev/null +++ b/app/ios/Movix/AppDelegate.mm @@ -0,0 +1,27 @@ +#import "AppDelegate.h" +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"MovixApp"; + self.initialProps = @{}; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/app/ios/Movix/Images.xcassets/AppIcon.appiconset/Contents.json b/app/ios/Movix/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..bd2bbdb --- /dev/null +++ b/app/ios/Movix/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,7 @@ +{ + "images" : [], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app/ios/Movix/Images.xcassets/Contents.json b/app/ios/Movix/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/app/ios/Movix/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app/ios/Movix/Images.xcassets/MovixLogo.imageset/Contents.json b/app/ios/Movix/Images.xcassets/MovixLogo.imageset/Contents.json new file mode 100644 index 0000000..0eb0c18 --- /dev/null +++ b/app/ios/Movix/Images.xcassets/MovixLogo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "movix512.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/app/ios/Movix/Images.xcassets/MovixLogo.imageset/movix512.png b/app/ios/Movix/Images.xcassets/MovixLogo.imageset/movix512.png new file mode 100644 index 0000000..1e5feb1 Binary files /dev/null and b/app/ios/Movix/Images.xcassets/MovixLogo.imageset/movix512.png differ diff --git a/app/ios/Movix/LaunchScreen.storyboard b/app/ios/Movix/LaunchScreen.storyboard new file mode 100644 index 0000000..5eaa921 --- /dev/null +++ b/app/ios/Movix/LaunchScreen.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/ios/Movix/main.m b/app/ios/Movix/main.m new file mode 100644 index 0000000..ef20c4e --- /dev/null +++ b/app/ios/Movix/main.m @@ -0,0 +1,9 @@ +#import +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/app/ios/MovixApp.xcodeproj/project.pbxproj b/app/ios/MovixApp.xcodeproj/project.pbxproj index 4232aaf..152ccef 100644 --- a/app/ios/MovixApp.xcodeproj/project.pbxproj +++ b/app/ios/MovixApp.xcodeproj/project.pbxproj @@ -13,9 +13,7 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23DB1FEBE14D043071FF72DB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; - 41E40626A5AC1CA31CD69918 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - AC81323540D785136BF39C6D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,9 +41,7 @@ 5709B34CF0A7D63546082F79 /* Pods-MovixApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MovixApp.release.xcconfig"; path = "Target Support Files/Pods-MovixApp/Pods-MovixApp.release.xcconfig"; sourceTree = ""; }; 5DCACB8F33CDC322A6C60F78 /* libPods-MovixApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MovixApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Movix/LaunchScreen.storyboard; sourceTree = ""; }; - C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-MovixApp-MovixAppTests/ExpoModulesProvider.swift"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-MovixApp/ExpoModulesProvider.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -110,20 +106,10 @@ 41107E703FD4EF2098255694 /* MovixApp */ = { isa = PBXGroup; children = ( - F2F51E192667AB0025306B69 /* ExpoModulesProvider.swift */, ); name = MovixApp; sourceTree = ""; }; - 5E5C6ED2CDC8047F14DA9058 /* ExpoModulesProviders */ = { - isa = PBXGroup; - children = ( - 41107E703FD4EF2098255694 /* MovixApp */, - A027C3DBE9B2BA83B1F37CBE /* MovixAppTests */, - ); - name = ExpoModulesProviders; - sourceTree = ""; - }; 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( @@ -140,7 +126,6 @@ 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, - 5E5C6ED2CDC8047F14DA9058 /* ExpoModulesProviders */, ); indentWidth = 2; sourceTree = ""; @@ -159,7 +144,6 @@ A027C3DBE9B2BA83B1F37CBE /* MovixAppTests */ = { isa = PBXGroup; children = ( - C831DD8B192E6E8C40679A41 /* ExpoModulesProvider.swift */, ); name = MovixAppTests; sourceTree = ""; @@ -180,7 +164,6 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "MovixAppTests" */; buildPhases = ( - 2DA8D433D005BA645A6DDEC2 /* [Expo] Configure project */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, @@ -200,7 +183,6 @@ buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MovixApp" */; buildPhases = ( C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - 2F9589DFEE1027F9C02ACFC4 /* [Expo] Configure project */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, @@ -223,7 +205,8 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1210; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1630; TargetAttributes = { 00E356ED1AD99517003FC87E = { CreatedOnToolsVersion = 6.2; @@ -307,52 +290,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MovixApp/Pods-MovixApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 2DA8D433D005BA645A6DDEC2 /* [Expo] Configure project */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env", - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp-MovixAppTests/expo-configure-project.sh", - ); - name = "[Expo] Configure project"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp-MovixAppTests/ExpoModulesProvider.swift", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-MovixApp-MovixAppTests/expo-configure-project.sh\"\n"; - }; - 2F9589DFEE1027F9C02ACFC4 /* [Expo] Configure project */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env", - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp/expo-configure-project.sh", - ); - name = "[Expo] Configure project"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(SRCROOT)/Pods/Target Support Files/Pods-MovixApp/ExpoModulesProvider.swift", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-MovixApp/expo-configure-project.sh\"\n"; - }; C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -400,7 +337,6 @@ buildActionMask = 2147483647; files = ( 00E356F31AD99517003FC87E /* MovixAppTests.m in Sources */, - 41E40626A5AC1CA31CD69918 /* ExpoModulesProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -410,7 +346,6 @@ files = ( 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, - AC81323540D785136BF39C6D /* ExpoModulesProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -445,9 +380,9 @@ "-lc++", "$(inherited)", ); - OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MovixApp.app/MovixApp"; }; name = Debug; @@ -469,9 +404,9 @@ "-lc++", "$(inherited)", ); - OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MovixApp.app/MovixApp"; }; name = Release; @@ -577,6 +512,7 @@ CXX = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -662,6 +598,7 @@ CXX = ""; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; @@ -699,6 +636,7 @@ ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; USE_HERMES = true; VALIDATE_PRODUCT = YES; }; diff --git a/app/ios/MovixApp.xcodeproj/xcshareddata/xcschemes/MovixApp.xcscheme b/app/ios/MovixApp.xcodeproj/xcshareddata/xcschemes/MovixApp.xcscheme index 0ec6095..a0375f9 100644 --- a/app/ios/MovixApp.xcodeproj/xcshareddata/xcschemes/MovixApp.xcscheme +++ b/app/ios/MovixApp.xcodeproj/xcshareddata/xcschemes/MovixApp.xcscheme @@ -1,6 +1,6 @@ false ) + + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++' + config.build_settings['OTHER_CPLUSPLUSFLAGS'] = '$(inherited) -include "$(PODS_ROOT)/../char_traits_fix.h"' + config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' + end + end + + # Remove Expo build phases injected by react-native (no expo in this project) + installer.aggregate_targets.each do |agg_target| + agg_target.user_project.targets.each do |target| + target.build_phases.select { |p| + p.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) && + p.name.to_s.include?("[Expo]") + }.each(&:remove_from_project) + end + agg_target.user_project.save + end end end diff --git a/app/ios/Podfile.lock b/app/ios/Podfile.lock index 10c700c..a7893ca 100644 --- a/app/ios/Podfile.lock +++ b/app/ios/Podfile.lock @@ -1805,6 +1805,6 @@ SPEC CHECKSUMS: SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: aa3df615739504eebb91925fc9c58b4922ea9a08 -PODFILE CHECKSUM: bf9e0a4bb659b81ffb2dc0e16d942b867c714a8b +PODFILE CHECKSUM: 70432ede410baea7d92a028a86c934d3f62363a0 COCOAPODS: 1.16.2 diff --git a/app/ios/char_traits_fix.h b/app/ios/char_traits_fix.h new file mode 100644 index 0000000..5489cd4 --- /dev/null +++ b/app/ios/char_traits_fix.h @@ -0,0 +1,26 @@ +#pragma once +#include +namespace std { + template <> + struct char_traits { + using char_type = unsigned char; + using int_type = unsigned int; + using off_type = std::streamoff; + using pos_type = std::streampos; + using state_type = std::mbstate_t; + static void assign(char_type& c1, const char_type& c2) noexcept { c1 = c2; } + static bool eq(char_type c1, char_type c2) noexcept { return c1 == c2; } + static bool lt(char_type c1, char_type c2) noexcept { return c1 < c2; } + static int compare(const char_type* s1, const char_type* s2, size_t n) { return memcmp(s1, s2, n); } + static size_t length(const char_type* s) { size_t i = 0; while (s[i]) ++i; return i; } + static const char_type* find(const char_type* s, size_t n, const char_type& a) { return (const char_type*)memchr(s, a, n); } + static char_type* move(char_type* s1, const char_type* s2, size_t n) { return (char_type*)memmove(s1, s2, n); } + static char_type* copy(char_type* s1, const char_type* s2, size_t n) { return (char_type*)memcpy(s1, s2, n); } + static char_type* assign(char_type* s, size_t n, char_type a) { return (char_type*)memset(s, a, n); } + static int_type not_eof(int_type c) noexcept { return c != eof() ? c : 0; } + static char_type to_char_type(int_type c) noexcept { return (char_type)c; } + static int_type to_int_type(char_type c) noexcept { return (int_type)c; } + static bool eq_int_type(int_type c1, int_type c2) noexcept { return c1 == c2; } + static int_type eof() noexcept { return (int_type)EOF; } + }; +}