diff --git a/README.md b/README.md index 3abecf180..213794bbf 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,27 @@ Follow the [React Native Getting Started Guide](https://facebook.github.io/react # Detailed configuration: +## Mac + +- General requirements + + - XCode 8.1 + - Install watchman + $ brew install watchman + +- Clone repository and configure: + ```bash + $ git clone git@github.com:mattermost/mattermost-mobile.git + $ cd mattermost-mobile + $ npm install + $ npm install -g react-native-cli + ``` + +- Run application + ```bash + $ make run + ``` + ## Linux: - General requiriments: @@ -18,20 +39,26 @@ Follow the [React Native Getting Started Guide](https://facebook.github.io/react - Virtualbox - An Android emulator: Genymotion or Android emulator. If using genymotion ensure that it uses existing adb tools (Settings: "Use custom Android SDK Tools") - Install watchman (do this globally): + ```bash $ git clone https://github.com/facebook/watchman.git $ cd watchman $ git checkout master $ ./autogen.sh $ ./configure make $ sudo make install + ``` Configure your kernel to accept a lot of file watches, using a command like: + ```bash $ sudo sysctl -w fs.inotify.max_user_watches=1048576 + ``` - Clone repository and configure: - $ git clone git@github.com:mattermost/mattermost-mobile.git + ```bash + $ git clone git@github.com:mattermost/mattermost-mobile.git $ cd mattermost-mobile $ npm install $ npm install -g react-native-cli + ``` - Add or edit file `src/config/config.secret.json` and add the url to the Mattermost server that you will use to develop: `{ @@ -39,9 +66,9 @@ Follow the [React Native Getting Started Guide](https://facebook.github.io/react }` To use a local Mattermost server you will need to configure the "DefaultServerUrl" depending on the emulator you will use: - IOs: "DefaultServerUrl": "http://localhost:8065" - Android: "DefaultServerUrl": "http://10.0.2.2:3000" - Genymotion: "DefaultServerUrl": "http://10.0.3.2:8065" + * IOs: "DefaultServerUrl": "http://localhost:8065" + * Android: "DefaultServerUrl": "http://10.0.2.2:3000" + * Genymotion: "DefaultServerUrl": "http://10.0.3.2:8065" - Run application - Start emulator diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index c3c5d8a8b..f7d50afc1 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; @@ -30,6 +29,7 @@ 1EA2B0081DB7E9620013B2DB /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1EA2B0001DB7E9620013B2DB /* MaterialIcons.ttf */; }; 1EA2B0091DB7E9620013B2DB /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1EA2B0011DB7E9620013B2DB /* Octicons.ttf */; }; 1EA2B00A1DB7E9620013B2DB /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1EA2B0021DB7E9620013B2DB /* Zocial.ttf */; }; + 7F55909D1DE33E62008E7FC5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; /* End PBXBuildFile section */ @@ -384,7 +384,7 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { @@ -540,9 +540,9 @@ buildActionMask = 2147483647; files = ( 1EA2B0081DB7E9620013B2DB /* MaterialIcons.ttf in Resources */, + 7F55909D1DE33E62008E7FC5 /* Images.xcassets in Resources */, 1EA2B0091DB7E9620013B2DB /* Octicons.ttf in Resources */, 1EA2B00A1DB7E9620013B2DB /* Zocial.ttf in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 1EA2B0051DB7E9620013B2DB /* FontAwesome.ttf in Resources */, 1EA2B0041DB7E9620013B2DB /* EvilIcons.ttf in Resources */, 1EA2B0071DB7E9620013B2DB /* Ionicons.ttf in Resources */, @@ -623,6 +623,7 @@ INFOPLIST_FILE = MattermostTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mattermost.app/Mattermost"; }; @@ -636,6 +637,7 @@ INFOPLIST_FILE = MattermostTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mattermost.app/Mattermost"; }; @@ -659,6 +661,7 @@ "-ObjC", "-lc++", ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Mattermost; VERSIONING_SYSTEM = "apple-generic"; }; @@ -681,6 +684,7 @@ "-ObjC", "-lc++", ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Mattermost; VERSIONING_SYSTEM = "apple-generic"; }; @@ -699,15 +703,19 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -745,8 +753,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -754,6 +764,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme index b2f41b33a..d45899dd1 100644 --- a/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme +++ b/ios/Mattermost.xcodeproj/xcshareddata/xcschemes/Mattermost.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:Mattermost.xcodeproj"> + + @@ -86,10 +89,10 @@ diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist index a188ed8b0..e20309672 100644 --- a/ios/Mattermost/Info.plist +++ b/ios/Mattermost/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,30 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UIAppFonts + + Entypo.ttf + EvilIcons.ttf + FontAwesome.ttf + Foundation.ttf + Ionicons.ttf + MaterialIcons.ttf + Octicons.ttf + Zocial.ttf + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -36,30 +60,5 @@ UIViewControllerBasedStatusBarAppearance - NSLocationWhenInUseUsageDescription - - UIAppFonts - - Entypo.ttf - EvilIcons.ttf - FontAwesome.ttf - Foundation.ttf - Ionicons.ttf - MaterialIcons.ttf - Octicons.ttf - Zocial.ttf - - NSAppTransportSecurity - - - NSExceptionDomains - - localhost - - NSTemporaryExceptionAllowsInsecureHTTPLoads - - - - diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist index 886825ccc..ba72822e8 100644 --- a/ios/MattermostTests/Info.plist +++ b/ios/MattermostTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName