Skip to content

Instantly share code, notes, and snippets.

View Banck's full-sized avatar

Sakhabaev Egor Banck

View GitHub Profile
{% for type in types.based.JSONAutoRepresentable| %}
// sourcery:inline:auto:{{ type.name }}.JSONAutoRepresentable
init(_ json: JSON) {
...
protocol JSONAutoRepresentable {}
sources:
- ProjectName/Models
templates:
- ProjectName/Templates
output:
ProjectName/Models
struct Place {
var id: String?
var name: String?
var position: String?
init(_ json: JSON) {
id = json["id"].string
name = json["name"].string
position = json["position"].string
}
<activity android:name="com.appodeal.ads.InterstitialActivity"
android:configChanges="orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name="com.appodeal.ads.VideoActivity"
android:configChanges="orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name="com.appodealx.mraid.MraidActivity"
android:configChanges="orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
<activity android:name="com.appodeal.ads.LoaderActivity"
2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Custom restriction was updated. Current custom restriction is {
2018-04-12 19:00:36.590729+0700 AppodealSwiftDemo[40687:2607092] 2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Custom restriction was updated. Current custom restriction is {
2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Twitter MoPub actual sdk version: 4.19.0
2018-04-12 19:00:36.591025+0700 AppodealSwiftDemo[40687:2607092] 2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Twitter MoPub actual sdk version: 4.19.0
2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] OpenX api integrate
2018-04-12 19:00:36.591256+0700 AppodealSwiftDemo[40687:2607092] 2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] OpenX api integrate
2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Appodeal X api integrate
2018-04-12 19:00:36.591499+0700 AppodealSwiftDemo[40687:2607092] 2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Appodeal X api integrate
2018-04-12 12:00:36 +0000 [Appodeal 2.3.0][info] Amazon Ads actual sdk v
2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Custom restriction was updated. Current custom restriction is {
2018-04-12 18:09:13.525315+0700 AppodealSwiftDemo[39975:2530332] 2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Custom restriction was updated. Current custom restriction is {
2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Twitter MoPub actual sdk version: 4.19.0
2018-04-12 18:09:13.525620+0700 AppodealSwiftDemo[39975:2530332] 2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Twitter MoPub actual sdk version: 4.19.0
2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] OpenX api integrate
2018-04-12 18:09:13.525873+0700 AppodealSwiftDemo[39975:2530332] 2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] OpenX api integrate
2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Appodeal X api integrate
2018-04-12 18:09:13.526127+0700 AppodealSwiftDemo[39975:2530332] 2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Appodeal X api integrate
2018-04-12 11:09:13 +0000 [Appodeal 2.3.0][info] Amazon Ads actual sdk v
03-08 12:50:10.144 12246-12246/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jvstudios.claptofindmyphone, PID: 12246
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.jvstudios.claptofindmyphone-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.jvstudios.claptofindmyphone-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5060)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4631)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4564)
-(UIInterfaceOrientationMask)application:(UIApplication* )application supportedInterfaceOrientationsForWindow:(UIWindow* )window {
id presentedViewController = [window.rootViewController presentedViewController];
NSString *className = presentedViewController ? NSStringFromClass([presentedViewController class]) : nil;
if (window && [className isEqualToString:@"SKStoreProductViewController"])
return UIInterfaceOrientationMaskLandscape;
else
return UIInterfaceOrientationMaskPortrait;
}
@Banck
Banck / 2
Last active November 9, 2017 13:55
func IntToReversedArrayOfInts (_ b:Int?)->(arr:[Int],count:Int){
guard let number = b else { return ([],0)}
let str = String(number)
var digits = str.flatMap{Int(String($0))}
digits = digits.reversed()
return (digits,digits.count)
}