Instantly share code, notes, and snippets.
Created
March 23, 2018 15:59
-
Star
(0)
0
You must be signed in to star a gist -
Fork
(0)
0
You must be signed in to fork a gist
-
Save birkir/bdbbe2619b29fe0b8cf291f32868dc14 to your computer and use it in GitHub Desktop.
This file contains 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/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml | |
index 332129b..5bdbb9d 100644 | |
--- a/android/app/src/main/AndroidManifest.xml | |
+++ b/android/app/src/main/AndroidManifest.xml | |
@@ -20,7 +20,13 @@ | |
android:name=".MainActivity" | |
android:label="@string/app_name" | |
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | |
- android:windowSoftInputMode="adjustResize"> | |
+ android:windowSoftInputMode="adjustResize" | |
+ android:launchMode="singleTask"> | |
+ <intent-filter> | |
+ <action android:name="android.intent.action.SEND" /> | |
+ <category android:name="android.intent.category.DEFAULT" /> | |
+ <data android:mimeType="text/plain" /> | |
+ </intent-filter> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
diff --git a/android/app/src/main/java/com/solidmobile/stinkyreview/MainApplication.java b/android/app/src/main/java/com/solidmobile/stinkyreview/MainApplication.java | |
index 5ab95f9..2dd2f99 100644 | |
--- a/android/app/src/main/java/com/solidmobile/stinkyreview/MainApplication.java | |
+++ b/android/app/src/main/java/com/solidmobile/stinkyreview/MainApplication.java | |
@@ -1,20 +1,29 @@ | |
package com.solidmobile.stinkyreview; | |
+import android.app.Activity; | |
import android.app.Application; | |
+import android.content.Intent; | |
+import android.os.Bundle; | |
import android.content.Context; | |
import android.support.multidex.MultiDex; | |
+import android.util.Log; | |
+import com.solidmobile.stinkyreview.RNIntent; | |
+import com.solidmobile.stinkyreview.RNIntentPackage; | |
+ | |
+import com.reactnativenavigation.controllers.ActivityCallbacks; | |
import com.reactnativenavigation.NavigationApplication; | |
import com.microsoft.codepush.react.CodePush; | |
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage; | |
+import io.sentry.RNSentryPackage; | |
-import com.facebook.react.ReactApplication; | |
import io.invertase.firebase.RNFirebasePackage; | |
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; | |
import io.invertase.firebase.admob.RNFirebaseAdMobPackage; | |
import io.invertase.firebase.auth.RNFirebaseAuthPackage; | |
import io.invertase.firebase.firestore.RNFirebaseFirestorePackage; | |
-import io.sentry.RNSentryPackage; | |
+ | |
+import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.shell.MainReactPackage; | |
@@ -31,6 +40,24 @@ protected void attachBaseContext(Context base) { | |
MultiDex.install(this); | |
} | |
+ @Override | |
+ public void onCreate() { | |
+ super.onCreate(); | |
+ setActivityCallbacks(new ActivityCallbacks() { | |
+ @Override | |
+ public void onActivityResumed(Activity activity) { | |
+ RNIntent intentInstance = RNIntent.sharedInstance(); | |
+ Intent intent = activity.getIntent(); | |
+ intentInstance.setIntent(intent.toUri(0)); | |
+ } | |
+ }); | |
+ } | |
+ | |
@Override | |
public boolean isDebug() { | |
return BuildConfig.DEBUG; | |
@@ -38,6 +65,7 @@ public boolean isDebug() { | |
protected List<ReactPackage> getPackages() { | |
return Arrays.<ReactPackage>asList( | |
+ new RNIntentPackage(), | |
new CodePush(BuildConfig.ANDROID_CODEPUSH_DEPLOYMENT_KEY, MainApplication.this, BuildConfig.DEBUG), | |
new ReactNativeConfigPackage(), | |
new RNSentryPackage(MainApplication.this), | |
diff --git a/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntent.java b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntent.java | |
new file mode 100644 | |
index 0000000..80cc40b | |
--- /dev/null | |
+++ b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntent.java | |
@@ -0,0 +1,30 @@ | |
+package com.solidmobile.stinkyreview; | |
+ | |
+import android.util.Log; | |
+ | |
+/** | |
+ * Created by machinatron on 2017-11-29. | |
+ */ | |
+ | |
+public class RNIntent { | |
+ | |
+ private static RNIntent instance; | |
+ | |
+ private String intentString; | |
+ | |
+ public static RNIntent sharedInstance() { | |
+ if (instance == null) { | |
+ instance = new RNIntent(); | |
+ } | |
+ return instance; | |
+ } | |
+ | |
+ public void setIntent(String intent) { | |
+ intentString = intent; | |
+ }; | |
+ | |
+ public String getIntent() { | |
+ return intentString; | |
+ }; | |
+ | |
+} | |
diff --git a/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentModule.java b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentModule.java | |
new file mode 100644 | |
index 0000000..52c7237 | |
--- /dev/null | |
+++ b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentModule.java | |
@@ -0,0 +1,32 @@ | |
+package com.solidmobile.stinkyreview; | |
+ | |
+import com.solidmobile.stinkyreview.RNIntent; | |
+import com.facebook.react.bridge.NativeModule; | |
+import com.facebook.react.bridge.ReactApplicationContext; | |
+import com.facebook.react.bridge.ReactContext; | |
+import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
+import com.facebook.react.bridge.ReactMethod; | |
+import com.facebook.react.bridge.Promise; | |
+import com.facebook.react.bridge.WritableNativeArray; | |
+ | |
+public class RNIntentModule extends ReactContextBaseJavaModule { | |
+ | |
+ RNIntent intentInstance = RNIntent.sharedInstance(); | |
+ | |
+ public RNIntentModule(ReactApplicationContext reactContext) { | |
+ super(reactContext); | |
+ } | |
+ | |
+ @Override | |
+ public String getName() { | |
+ return "RNIntent"; | |
+ } | |
+ | |
+ @ReactMethod | |
+ public void getIntent(Promise promise) { | |
+ String intent = intentInstance.getIntent(); | |
+ if (promise != null) { | |
+ promise.resolve(intent); | |
+ } | |
+ } | |
+} | |
diff --git a/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentPackage.java b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentPackage.java | |
new file mode 100644 | |
index 0000000..5c3412f | |
--- /dev/null | |
+++ b/android/app/src/main/java/com/solidmobile/stinkyreview/RNIntentPackage.java | |
@@ -0,0 +1,27 @@ | |
+package com.solidmobile.stinkyreview; | |
+ | |
+import com.facebook.react.ReactPackage; | |
+import com.facebook.react.bridge.JavaScriptModule; | |
+import com.facebook.react.bridge.NativeModule; | |
+import com.facebook.react.bridge.ReactApplicationContext; | |
+import com.facebook.react.uimanager.ViewManager; | |
+ | |
+import java.util.ArrayList; | |
+import java.util.Arrays; | |
+import java.util.Collections; | |
+import java.util.List; | |
+ | |
+public class RNIntentPackage implements ReactPackage { | |
+ | |
+ @Override | |
+ public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | |
+ return Collections.emptyList(); | |
+ } | |
+ | |
+ @Override | |
+ public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | |
+ List<NativeModule> modules = new ArrayList<>(); | |
+ modules.add(new RNIntentModule(reactContext)); | |
+ return modules; | |
+ } | |
+} | |
diff --git a/ios/StinkyReview/Base.lproj/LaunchScreen.xib b/ios/StinkyReview/Base.lproj/LaunchScreen.xib | |
index 82948d8..8b30891 100644 | |
--- a/ios/StinkyReview/Base.lproj/LaunchScreen.xib | |
+++ b/ios/StinkyReview/Base.lproj/LaunchScreen.xib | |
@@ -1,9 +1,12 @@ | |
<?xml version="1.0" encoding="UTF-8"?> | |
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="NO"> | |
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES"> | |
+ <device id="retina4_7" orientation="portrait"> | |
+ <adaptation id="fullscreen"/> | |
+ </device> | |
<dependencies> | |
- <development version="7000" identifier="xcode"/> | |
+ <deployment identifier="iOS"/> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
- <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> | |
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
</dependencies> | |
<objects> | |
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | |
@@ -11,29 +14,7 @@ | |
<view contentMode="scaleToFill" id="iN0-l3-epB"> | |
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/> | |
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
- <subviews> | |
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> | |
- <rect key="frame" x="20" y="439" width="441" height="21"/> | |
- <fontDescription key="fontDescription" type="system" pointSize="17"/> | |
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | |
- <nil key="highlightedColor"/> | |
- </label> | |
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="StinkyReview" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | |
- <rect key="frame" x="20" y="140" width="441" height="43"/> | |
- <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | |
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | |
- <nil key="highlightedColor"/> | |
- </label> | |
- </subviews> | |
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> | |
- <constraints> | |
- <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> | |
- <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> | |
- <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/> | |
- <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/> | |
- <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/> | |
- <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> | |
- </constraints> | |
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
<nil key="simulatedStatusBarMetrics"/> | |
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | |
<point key="canvasLocation" x="548" y="455"/> | |
diff --git a/ios/Share/Base.lproj/MainInterface.storyboard b/ios/Share/Base.lproj/MainInterface.storyboard | |
new file mode 100644 | |
index 0000000..a141885 | |
--- /dev/null | |
+++ b/ios/Share/Base.lproj/MainInterface.storyboard | |
@@ -0,0 +1,24 @@ | |
+<?xml version="1.0" encoding="UTF-8"?> | |
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A278a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="j1y-V4-xli"> | |
+ <dependencies> | |
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | |
+ <capability name="Safe area layout guides" minToolsVersion="9.0"/> | |
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
+ </dependencies> | |
+ <scenes> | |
+ <!--Share View Controller--> | |
+ <scene sceneID="ceB-am-kn3"> | |
+ <objects> | |
+ <viewController id="j1y-V4-xli" customClass="ShareViewController" customModuleProvider="" sceneMemberID="viewController"> | |
+ <view key="view" opaque="NO" contentMode="scaleToFill" id="wbc-yd-nQP"> | |
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
+ <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> | |
+ <viewLayoutGuide key="safeArea" id="1Xd-am-t49"/> | |
+ </view> | |
+ </viewController> | |
+ <placeholder placeholderIdentifier="IBFirstResponder" id="CEy-Cv-SGf" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
+ </objects> | |
+ </scene> | |
+ </scenes> | |
+</document> | |
diff --git a/ios/Share/Info.plist b/ios/Share/Info.plist | |
new file mode 100644 | |
index 0000000..f446af1 | |
--- /dev/null | |
+++ b/ios/Share/Info.plist | |
@@ -0,0 +1,36 @@ | |
+<?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>CFBundleDevelopmentRegion</key> | |
+ <string>$(DEVELOPMENT_LANGUAGE)</string> | |
+ <key>CFBundleDisplayName</key> | |
+ <string>Stinky Review</string> | |
+ <key>CFBundleExecutable</key> | |
+ <string>$(EXECUTABLE_NAME)</string> | |
+ <key>CFBundleIdentifier</key> | |
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
+ <key>CFBundleInfoDictionaryVersion</key> | |
+ <string>6.0</string> | |
+ <key>CFBundleName</key> | |
+ <string>$(PRODUCT_NAME)</string> | |
+ <key>CFBundlePackageType</key> | |
+ <string>XPC!</string> | |
+ <key>CFBundleShortVersionString</key> | |
+ <string>1.0.0</string> | |
+ <key>CFBundleVersion</key> | |
+ <string>1</string> | |
+ <key>NSExtension</key> | |
+ <dict> | |
+ <key>NSExtensionAttributes</key> | |
+ <dict> | |
+ <key>NSExtensionActivationRule</key> | |
+ <string>TRUEPREDICATE</string> | |
+ </dict> | |
+ <key>NSExtensionMainStoryboard</key> | |
+ <string>MainInterface</string> | |
+ <key>NSExtensionPointIdentifier</key> | |
+ <string>com.apple.share-services</string> | |
+ </dict> | |
+</dict> | |
+</plist> | |
diff --git a/ios/Share/ShareViewController.h b/ios/Share/ShareViewController.h | |
new file mode 100644 | |
index 0000000..5a987ab | |
--- /dev/null | |
+++ b/ios/Share/ShareViewController.h | |
@@ -0,0 +1,13 @@ | |
+// | |
+// ShareViewController.h | |
+// Share | |
+// | |
+// Created by Birkir Rafn Gudjonsson on 06/01/2018. | |
+// Copyright © 2018 Facebook. All rights reserved. | |
+// | |
+ | |
+#import <UIKit/UIKit.h> | |
+ | |
+@interface ShareViewController : UIViewController | |
+ | |
+@end | |
diff --git a/ios/Share/ShareViewController.m b/ios/Share/ShareViewController.m | |
new file mode 100644 | |
index 0000000..68b3eec | |
--- /dev/null | |
+++ b/ios/Share/ShareViewController.m | |
@@ -0,0 +1,69 @@ | |
+// | |
+// ShareViewController.m | |
+// Share | |
+// | |
+// Created by Birkir Rafn Gudjonsson on 06/01/2018. | |
+// Copyright © 2018 Facebook. All rights reserved. | |
+// | |
+ | |
+#import "ShareViewController.h" | |
+ | |
+#define URL_IDENTIFIER @"public.url" | |
+ | |
+@interface ShareViewController () | |
+ | |
+@end | |
+ | |
+@implementation ShareViewController | |
+ | |
+ - (void)viewDidLoad { | |
+ [super viewDidLoad]; | |
+ UIApplication *application = [UIApplication sharedApplication]; | |
+ [self extractDataFromContext:self.extensionContext withCallback:^(NSString* val, NSString* contentType, NSException* err) { | |
+ NSString *escapedUrl = [val stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]; | |
+ NSString *url =[NSString stringWithFormat:@"stinkyreview://product?url=%@", escapedUrl]; | |
+ NSURL *urlToOpen = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]]; | |
+ [application openURL:urlToOpen options:@{} completionHandler:^(BOOL success) { | |
+ [self.extensionContext completeRequestReturningItems:nil completionHandler:nil]; | |
+ }]; | |
+ }]; | |
+ } | |
+ | |
+ | |
+- (void)extractDataFromContext:(NSExtensionContext *)context withCallback:(void(^)(NSString *value, NSString* contentType, NSException *exception))callback { | |
+ | |
+ @try { | |
+ NSExtensionItem *item = [context.inputItems firstObject]; | |
+ NSArray *attachments = item.attachments; | |
+ __block NSItemProvider *urlProvider = nil; | |
+ | |
+ [attachments enumerateObjectsUsingBlock:^(NSItemProvider *provider, NSUInteger idx, BOOL *stop) { | |
+ if ([provider hasItemConformingToTypeIdentifier:URL_IDENTIFIER]) { | |
+ urlProvider = provider; | |
+ *stop = YES; | |
+ } | |
+ }]; | |
+ | |
+ if (urlProvider) { | |
+ [urlProvider loadItemForTypeIdentifier:URL_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) { | |
+ NSURL *url = (NSURL *)item; | |
+ if (callback) { | |
+ callback([url absoluteString], @"text/plain", nil); | |
+ } | |
+ }]; | |
+ } else { | |
+ if (callback) { | |
+ callback(nil, nil, [NSException exceptionWithName:@"Error" reason:@"couldn't find provider" userInfo:nil]); | |
+ } | |
+ } | |
+ } | |
+ | |
+ @catch (NSException *exception) { | |
+ if (callback) { | |
+ callback(nil, nil, exception); | |
+ } | |
+ } | |
+} | |
+ | |
+ | |
+@end | |
diff --git a/ios/StinkyReview.xcodeproj/project.pbxproj b/ios/StinkyReview.xcodeproj/project.pbxproj | |
index 06f285a..0a091d9 100644 | |
--- a/ios/StinkyReview.xcodeproj/project.pbxproj | |
+++ b/ios/StinkyReview.xcodeproj/project.pbxproj | |
@@ -39,6 +39,9 @@ | |
E3786C761FFDD26C002C3F7B /* SF-Pro-Text-HeavyItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = E3786C581FFDD26C002C3F7B /* SF-Pro-Text-HeavyItalic.otf */; }; | |
E3786C771FFDD26C002C3F7B /* SF-Pro-Text-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = E3786C591FFDD26C002C3F7B /* SF-Pro-Text-MediumItalic.otf */; }; | |
E3786C781FFDD26C002C3F7B /* SF-Pro-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = E3786C5A1FFDD26C002C3F7B /* SF-Pro-Text-Regular.otf */; }; | |
+ E3786C8220016C58002C3F7B /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E3786C8120016C58002C3F7B /* ShareViewController.m */; }; | |
+ E3786C8520016C58002C3F7B /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E3786C8320016C58002C3F7B /* MainInterface.storyboard */; }; | |
+ E3786C8920016C58002C3F7B /* Share.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = E3786C7E20016C57002C3F7B /* Share.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; | |
E3A2B8A61FEACEE70099C8F8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E3A2B89F1FEACEE70099C8F8 /* AppDelegate.m */; }; | |
E3A2B8A71FEACEE70099C8F8 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3A2B8A01FEACEE70099C8F8 /* LaunchScreen.xib */; }; | |
E3A2B8A81FEACEE70099C8F8 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E3A2B8A21FEACEE70099C8F8 /* GoogleService-Info.plist */; }; | |
@@ -47,6 +50,30 @@ | |
E3A2B8AB1FEACEE70099C8F8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E3A2B8A51FEACEE70099C8F8 /* main.m */; }; | |
/* End PBXBuildFile section */ | |
+/* Begin PBXContainerItemProxy section */ | |
+ E3786C8720016C58002C3F7B /* PBXContainerItemProxy */ = { | |
+ isa = PBXContainerItemProxy; | |
+ containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; | |
+ proxyType = 1; | |
+ remoteGlobalIDString = E3786C7D20016C57002C3F7B; | |
+ remoteInfo = Share; | |
+ }; | |
+/* End PBXContainerItemProxy section */ | |
+ | |
+/* Begin PBXCopyFilesBuildPhase section */ | |
+ E3786C8D20016C58002C3F7B /* Embed App Extensions */ = { | |
+ isa = PBXCopyFilesBuildPhase; | |
+ buildActionMask = 2147483647; | |
+ dstPath = ""; | |
+ dstSubfolderSpec = 13; | |
+ files = ( | |
+ E3786C8920016C58002C3F7B /* Share.appex in Embed App Extensions */, | |
+ ); | |
+ name = "Embed App Extensions"; | |
+ runOnlyForDeploymentPostprocessing = 0; | |
+ }; | |
+/* End PBXCopyFilesBuildPhase section */ | |
+ | |
/* Begin PBXFileReference section */ | |
13B07F961A680F5B00A75B9A /* StinkyReview.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StinkyReview.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |
3988A5A05ABF10E5A9B33ED5 /* libPods-StinkyReview.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StinkyReview.a"; sourceTree = BUILT_PRODUCTS_DIR; }; | |
@@ -90,6 +117,11 @@ | |
E3786C591FFDD26C002C3F7B /* SF-Pro-Text-MediumItalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SF-Pro-Text-MediumItalic.otf"; path = "../../assets/fonts/SF-Pro-Text-MediumItalic.otf"; sourceTree = "<group>"; }; | |
E3786C5A1FFDD26C002C3F7B /* SF-Pro-Text-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SF-Pro-Text-Regular.otf"; path = "../../assets/fonts/SF-Pro-Text-Regular.otf"; sourceTree = "<group>"; }; | |
E3786C79200069D2002C3F7B /* StinkyReview.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StinkyReview.entitlements; sourceTree = "<group>"; }; | |
+ E3786C7E20016C57002C3F7B /* Share.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Share.appex; sourceTree = BUILT_PRODUCTS_DIR; }; | |
+ E3786C8020016C58002C3F7B /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = "<group>"; }; | |
+ E3786C8120016C58002C3F7B /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareViewController.m; sourceTree = "<group>"; }; | |
+ E3786C8420016C58002C3F7B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; }; | |
+ E3786C8620016C58002C3F7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | |
E3A2B89E1FEACEE70099C8F8 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; | |
E3A2B89F1FEACEE70099C8F8 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; | |
E3A2B8A11FEACEE70099C8F8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; | |
@@ -109,6 +141,13 @@ | |
); | |
runOnlyForDeploymentPostprocessing = 0; | |
}; | |
+ E3786C7B20016C57002C3F7B /* Frameworks */ = { | |
+ isa = PBXFrameworksBuildPhase; | |
+ buildActionMask = 2147483647; | |
+ files = ( | |
+ ); | |
+ runOnlyForDeploymentPostprocessing = 0; | |
+ }; | |
/* End PBXFrameworksBuildPhase section */ | |
/* Begin PBXGroup section */ | |
@@ -147,6 +186,7 @@ | |
children = ( | |
E3A2B89D1FEACEE70099C8F8 /* StinkyReview */, | |
832341AE1AAA6A7D00B99B32 /* Libraries */, | |
+ E3786C7F20016C58002C3F7B /* Share */, | |
83CBBA001A601CBA00E9B192 /* Products */, | |
8079FCF0BF9CE803AC9EB17F /* Pods */, | |
4CE6C5BA572EF6078027A293 /* Frameworks */, | |
@@ -160,6 +200,7 @@ | |
isa = PBXGroup; | |
children = ( | |
13B07F961A680F5B00A75B9A /* StinkyReview.app */, | |
+ E3786C7E20016C57002C3F7B /* Share.appex */, | |
); | |
name = Products; | |
sourceTree = "<group>"; | |
@@ -201,6 +242,17 @@ | |
path = Fonts; | |
sourceTree = "<group>"; | |
}; | |
+ E3786C7F20016C58002C3F7B /* Share */ = { | |
+ isa = PBXGroup; | |
+ children = ( | |
+ E3786C8020016C58002C3F7B /* ShareViewController.h */, | |
+ E3786C8120016C58002C3F7B /* ShareViewController.m */, | |
+ E3786C8320016C58002C3F7B /* MainInterface.storyboard */, | |
+ E3786C8620016C58002C3F7B /* Info.plist */, | |
+ ); | |
+ path = Share; | |
+ sourceTree = "<group>"; | |
+ }; | |
E3A2B89D1FEACEE70099C8F8 /* StinkyReview */ = { | |
isa = PBXGroup; | |
children = ( | |
@@ -249,16 +301,35 @@ | |
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, | |
F32D0D292EBCD0619CEB5424 /* [CP] Embed Pods Frameworks */, | |
BE2E2C58577DE61FBF9F0CAB /* [CP] Copy Pods Resources */, | |
+ E3786C8D20016C58002C3F7B /* Embed App Extensions */, | |
); | |
buildRules = ( | |
); | |
dependencies = ( | |
+ E3786C8820016C58002C3F7B /* PBXTargetDependency */, | |
); | |
name = StinkyReview; | |
productName = "Hello World"; | |
productReference = 13B07F961A680F5B00A75B9A /* StinkyReview.app */; | |
productType = "com.apple.product-type.application"; | |
}; | |
+ E3786C7D20016C57002C3F7B /* Share */ = { | |
+ isa = PBXNativeTarget; | |
+ buildConfigurationList = E3786C8C20016C58002C3F7B /* Build configuration list for PBXNativeTarget "Share" */; | |
+ buildPhases = ( | |
+ E3786C7A20016C57002C3F7B /* Sources */, | |
+ E3786C7B20016C57002C3F7B /* Frameworks */, | |
+ E3786C7C20016C57002C3F7B /* Resources */, | |
+ ); | |
+ buildRules = ( | |
+ ); | |
+ dependencies = ( | |
+ ); | |
+ name = Share; | |
+ productName = Share; | |
+ productReference = E3786C7E20016C57002C3F7B /* Share.appex */; | |
+ productType = "com.apple.product-type.app-extension"; | |
+ }; | |
/* End PBXNativeTarget section */ | |
/* Begin PBXProject section */ | |
@@ -277,6 +348,11 @@ | |
}; | |
}; | |
}; | |
+ E3786C7D20016C57002C3F7B = { | |
+ CreatedOnToolsVersion = 9.2; | |
+ DevelopmentTeam = 5PD7JU2FJC; | |
+ ProvisioningStyle = Manual; | |
+ }; | |
E3AAD4501F573E3700B7831D = { | |
CreatedOnToolsVersion = 8.3.3; | |
DevelopmentTeam = 5PD7JU2FJC; | |
@@ -299,6 +375,7 @@ | |
targets = ( | |
E3AAD4501F573E3700B7831D /* build-env */, | |
13B07F861A680F5B00A75B9A /* StinkyReview */, | |
+ E3786C7D20016C57002C3F7B /* Share */, | |
); | |
}; | |
/* End PBXProject section */ | |
@@ -345,6 +422,14 @@ | |
); | |
runOnlyForDeploymentPostprocessing = 0; | |
}; | |
+ E3786C7C20016C57002C3F7B /* Resources */ = { | |
+ isa = PBXResourcesBuildPhase; | |
+ buildActionMask = 2147483647; | |
+ files = ( | |
+ E3786C8520016C58002C3F7B /* MainInterface.storyboard in Resources */, | |
+ ); | |
+ runOnlyForDeploymentPostprocessing = 0; | |
+ }; | |
/* End PBXResourcesBuildPhase section */ | |
/* Begin PBXShellScriptBuildPhase section */ | |
@@ -426,9 +511,33 @@ | |
); | |
runOnlyForDeploymentPostprocessing = 0; | |
}; | |
+ E3786C7A20016C57002C3F7B /* Sources */ = { | |
+ isa = PBXSourcesBuildPhase; | |
+ buildActionMask = 2147483647; | |
+ files = ( | |
+ E3786C8220016C58002C3F7B /* ShareViewController.m in Sources */, | |
+ ); | |
+ runOnlyForDeploymentPostprocessing = 0; | |
+ }; | |
/* End PBXSourcesBuildPhase section */ | |
+/* Begin PBXTargetDependency section */ | |
+ E3786C8820016C58002C3F7B /* PBXTargetDependency */ = { | |
+ isa = PBXTargetDependency; | |
+ target = E3786C7D20016C57002C3F7B /* Share */; | |
+ targetProxy = E3786C8720016C58002C3F7B /* PBXContainerItemProxy */; | |
+ }; | |
+/* End PBXTargetDependency section */ | |
+ | |
/* Begin PBXVariantGroup section */ | |
+ E3786C8320016C58002C3F7B /* MainInterface.storyboard */ = { | |
+ isa = PBXVariantGroup; | |
+ children = ( | |
+ E3786C8420016C58002C3F7B /* Base */, | |
+ ); | |
+ name = MainInterface.storyboard; | |
+ sourceTree = "<group>"; | |
+ }; | |
E3A2B8A01FEACEE70099C8F8 /* LaunchScreen.xib */ = { | |
isa = PBXVariantGroup; | |
children = ( | |
@@ -446,6 +555,7 @@ | |
buildSettings = { | |
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
CODE_SIGN_ENTITLEMENTS = StinkyReview/StinkyReview.entitlements; | |
+ CODE_SIGN_IDENTITY = "iPhone Developer"; | |
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; | |
CODE_SIGN_STYLE = Manual; | |
CURRENT_PROJECT_VERSION = 4; | |
@@ -475,6 +585,7 @@ | |
buildSettings = { | |
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
CODE_SIGN_ENTITLEMENTS = StinkyReview/StinkyReview.entitlements; | |
+ CODE_SIGN_IDENTITY = "iPhone Developer"; | |
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; | |
CODE_SIGN_STYLE = Manual; | |
CURRENT_PROJECT_VERSION = 4; | |
@@ -573,6 +684,80 @@ | |
}; | |
name = Release; | |
}; | |
+ E3786C8A20016C58002C3F7B /* Debug */ = { | |
+ isa = XCBuildConfiguration; | |
+ buildSettings = { | |
+ APPLICATION_EXTENSION_API_ONLY = NO; | |
+ CLANG_ANALYZER_NONNULL = YES; | |
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | |
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | |
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | |
+ CLANG_WARN_COMMA = YES; | |
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | |
+ CLANG_WARN_INFINITE_RECURSION = YES; | |
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | |
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |
+ CLANG_WARN_STRICT_PROTOTYPES = YES; | |
+ CLANG_WARN_SUSPICIOUS_MOVE = YES; | |
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; | |
+ CODE_SIGN_IDENTITY = "iPhone Developer"; | |
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; | |
+ CODE_SIGN_STYLE = Manual; | |
+ DEBUG_INFORMATION_FORMAT = dwarf; | |
+ DEVELOPMENT_TEAM = 5PD7JU2FJC; | |
+ ENABLE_TESTABILITY = YES; | |
+ GCC_C_LANGUAGE_STANDARD = gnu11; | |
+ GCC_NO_COMMON_BLOCKS = YES; | |
+ INFOPLIST_FILE = Share/Info.plist; | |
+ IPHONEOS_DEPLOYMENT_TARGET = 11.2; | |
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | |
+ PRODUCT_BUNDLE_IDENTIFIER = com.solidmobile.stinkyreview.Share; | |
+ PRODUCT_NAME = "$(TARGET_NAME)"; | |
+ PROVISIONING_PROFILE = "5fcf0794-b55c-49c3-b5b7-e7697232b366"; | |
+ PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.solidmobile.stinkyreview.Share"; | |
+ SKIP_INSTALL = YES; | |
+ TARGETED_DEVICE_FAMILY = "1,2"; | |
+ }; | |
+ name = Debug; | |
+ }; | |
+ E3786C8B20016C58002C3F7B /* Release */ = { | |
+ isa = XCBuildConfiguration; | |
+ buildSettings = { | |
+ APPLICATION_EXTENSION_API_ONLY = NO; | |
+ CLANG_ANALYZER_NONNULL = YES; | |
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | |
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | |
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | |
+ CLANG_WARN_COMMA = YES; | |
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | |
+ CLANG_WARN_INFINITE_RECURSION = YES; | |
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | |
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |
+ CLANG_WARN_STRICT_PROTOTYPES = YES; | |
+ CLANG_WARN_SUSPICIOUS_MOVE = YES; | |
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; | |
+ CODE_SIGN_IDENTITY = "iPhone Developer"; | |
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; | |
+ CODE_SIGN_STYLE = Manual; | |
+ COPY_PHASE_STRIP = NO; | |
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | |
+ DEVELOPMENT_TEAM = 5PD7JU2FJC; | |
+ GCC_C_LANGUAGE_STANDARD = gnu11; | |
+ GCC_NO_COMMON_BLOCKS = YES; | |
+ INFOPLIST_FILE = Share/Info.plist; | |
+ IPHONEOS_DEPLOYMENT_TARGET = 11.2; | |
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | |
+ PRODUCT_BUNDLE_IDENTIFIER = com.solidmobile.stinkyreview.Share; | |
+ PRODUCT_NAME = "$(TARGET_NAME)"; | |
+ PROVISIONING_PROFILE = "5fcf0794-b55c-49c3-b5b7-e7697232b366"; | |
+ PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.solidmobile.stinkyreview.Share"; | |
+ SKIP_INSTALL = YES; | |
+ TARGETED_DEVICE_FAMILY = "1,2"; | |
+ }; | |
+ name = Release; | |
+ }; | |
E3AAD4521F573E3800B7831D /* Debug */ = { | |
isa = XCBuildConfiguration; | |
buildSettings = { | |
@@ -633,6 +818,15 @@ | |
defaultConfigurationIsVisible = 0; | |
defaultConfigurationName = Release; | |
}; | |
+ E3786C8C20016C58002C3F7B /* Build configuration list for PBXNativeTarget "Share" */ = { | |
+ isa = XCConfigurationList; | |
+ buildConfigurations = ( | |
+ E3786C8A20016C58002C3F7B /* Debug */, | |
+ E3786C8B20016C58002C3F7B /* Release */, | |
+ ); | |
+ defaultConfigurationIsVisible = 0; | |
+ defaultConfigurationName = Release; | |
+ }; | |
E3AAD4511F573E3800B7831D /* Build configuration list for PBXLegacyTarget "build-env" */ = { | |
isa = XCConfigurationList; | |
buildConfigurations = ( | |
diff --git a/ios/Share/Info.plist b/ios/Share/Info.plist | |
index d2ffaa3..c6f5c31 100644 | |
--- a/ios/Share/Info.plist | |
+++ b/ios/Share/Info.plist | |
@@ -19,13 +19,20 @@ | |
<key>CFBundleShortVersionString</key> | |
<string>1.0.1</string> | |
<key>CFBundleVersion</key> | |
- <string>1</string> | |
+ <string>6</string> | |
<key>NSExtension</key> | |
<dict> | |
<key>NSExtensionAttributes</key> | |
<dict> | |
<key>NSExtensionActivationRule</key> | |
- <string>TRUEPREDICATE</string> | |
+ <dict> | |
+ <key>NSExtensionActivationSupportsText</key> | |
+ <true/> | |
+ <key>NSExtensionActivationSupportsWebPageWithMaxCount</key> | |
+ <integer>1</integer> | |
+ <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> | |
+ <integer>1</integer> | |
+ </dict> | |
</dict> | |
<key>NSExtensionMainStoryboard</key> | |
<string>MainInterface</string> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment