- Create a project in XCode with the default settings
- iOS > Application > Single View Application
- Language: Swift
- Under project General settings, add ReactKit to Linked Framework and Libraries
- + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
- Now ReactKit would have been imported. Link it by choosing it from the list.
- + > lib.ReactKit.a
- Under project Build Settings,
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
NSArray *albums = @[[Album albumWithName:@"Random Access Memories" price:9.99f], | |
[Album albumWithName:@"Clarity" price:6.99f], | |
[Album albumWithName:@"Weekend in America" price:7.99f], | |
[Album albumWithName:@"Weekend in America" price:7.90f], | |
[Album albumWithName:@"Bangarang EP" price:2.99f]]; | |
// Reversing an Array | |
__unused NSArray *reversed = albums.reverseObjectEnumerator.allObjects; | |
// PREDICATES |
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
+ (NSAttributedString *)artsyBodyTextAttributedStringFromHTML:(NSString *)HTML withFont:(UIFont *)font | |
{ | |
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; | |
style.lineHeightMultiple = 1.2; | |
style.paragraphSpacing = font.pointSize * .5; | |
NSDictionary *textParams = @{ | |
NSFontAttributeName : font, | |
NSParagraphStyleAttributeName : style, |
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
// | |
// MultiDirectionAdjudicatingScrollView.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 12/16/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit | |
import UIKit.UIGestureRecognizerSubclass |
- List your dependencies in a Cartfile. Refer to the Carthage documentation for details.
- Run
carthage bootstrap --no-build --use-submodules
- Create a new workspace.
- Drag your existing App project into the workspace.
- Drag framework dependency projects from ./Carthage/Checkouts into the workspace.
- Go to the General tab of your target properties.
- Add framework dependencies to Linked Frameworks and Libraries. They will show up as Workspace frameworks.
- Add the same frameworks to Embedded Binaries.
- Note, the previous step will probably create duplicates in Linked Frameworks and Libraries. Delete the duplicates.
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/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
index a9779ad..36726d6 100644 | |
--- a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
+++ b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
@@ -3,6 +3,7 @@ package com.swmansion.rnscreens; | |
import android.content.Context; | |
import android.graphics.PorterDuff; | |
import android.graphics.drawable.Drawable; | |
+import android.os.Build; | |
import android.text.TextUtils; |
If you ever need to modify the proguard rules for the Android-part of your Expo managed workflow, you can achieve this by using a config plugin.
- Make a folder for config-plugins called
./plugins
in the project root folder. - Place the
withProguardRules.js
andmy-proguard-rules.pro
in the folder - Add the config plugin to the
plugins
array of yourapp.config.js
(orapp.json
if you're using that instead).
NOTE: if you rename your .pro
file, don't forget to change the two occurrences of my-proguard-rules
in withProguardRules.js
as well.