iOS: updating platform-specific things
This commit is contained in:
parent
f8d26cc424
commit
f544447341
@ -36,7 +36,6 @@
|
||||
4B35A9F41EEE017000274961 /* scripting_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B35A9F21EEE017000274961 /* scripting_client.cpp */; };
|
||||
4B35A9F71EEE018D00274961 /* scripting_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B35A9F51EEE018D00274961 /* scripting_server.cpp */; };
|
||||
842A808C2339174C00A89418 /* ads.mm in Sources */ = {isa = PBXBuildFile; fileRef = 842A808B2339174C00A89418 /* ads.mm */; };
|
||||
844B495F228606B200EB60EF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 844B495D228606B200EB60EF /* Main.storyboard */; };
|
||||
8465A76522A7D4500095B7CA /* libintl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465A76422A7D4500095B7CA /* libintl.cpp */; };
|
||||
849C4F86209656D3005EB041 /* ru.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 849C4F85209656D2005EB041 /* ru.lproj */; };
|
||||
84B9C11724A4D82400016BCE /* ConsentAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B9C11524A4D82400016BCE /* ConsentAlertViewController.swift */; };
|
||||
@ -44,7 +43,6 @@
|
||||
84C0FB1B24B35D9200606FAA /* Bugsnag in Frameworks */ = {isa = PBXBuildFile; productRef = 84C0FB1A24B35D9200606FAA /* Bugsnag */; };
|
||||
84C32A3724AF7A4500445E92 /* Nantes in Frameworks */ = {isa = PBXBuildFile; productRef = 84C32A3624AF7A4500445E92 /* Nantes */; };
|
||||
84C32A3924AF7DDE00445E92 /* UITextViewPlaceholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C32A3824AF7DDE00445E92 /* UITextViewPlaceholder.swift */; };
|
||||
84CD4A4D24877FA20019B81D /* VersionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CD4A4C24877FA20019B81D /* VersionManager.m */; };
|
||||
84CD4A64248782720019B81D /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CD4A59248782720019B81D /* MainWindow.swift */; };
|
||||
84CD4A65248782720019B81D /* ProgressViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84CD4A5B248782720019B81D /* ProgressViewController.xib */; };
|
||||
84CD4A66248782720019B81D /* MessageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84CD4A5C248782720019B81D /* MessageViewController.xib */; };
|
||||
@ -295,7 +293,6 @@
|
||||
840E2F9E233410F90088E7F7 /* SDVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDVersion.h; path = SDVersion/SDVersion.h; sourceTree = "<group>"; };
|
||||
842A808A2339174B00A89418 /* ads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ads.h; path = Ads/ads.h; sourceTree = "<group>"; };
|
||||
842A808B2339174C00A89418 /* ads.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ads.mm; path = Ads/ads.mm; sourceTree = "<group>"; };
|
||||
844B495E228606B200EB60EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
8465A76122A7D4500095B7CA /* MessageCatalog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = MessageCatalog.hpp; path = ../../../../lib/intl/MessageCatalog.hpp; sourceTree = "<group>"; };
|
||||
8465A76222A7D4500095B7CA /* libintl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libintl.h; path = ../../../../lib/intl/libintl.h; sourceTree = "<group>"; };
|
||||
8465A76322A7D4500095B7CA /* Util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Util.hpp; path = ../../../../lib/intl/Util.hpp; sourceTree = "<group>"; };
|
||||
@ -304,8 +301,6 @@
|
||||
84B9C11524A4D82400016BCE /* ConsentAlertViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsentAlertViewController.swift; sourceTree = "<group>"; };
|
||||
84B9C11624A4D82400016BCE /* ConsentAlertViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConsentAlertViewController.xib; sourceTree = "<group>"; };
|
||||
84C32A3824AF7DDE00445E92 /* UITextViewPlaceholder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITextViewPlaceholder.swift; sourceTree = "<group>"; };
|
||||
84CD4A4B24877FA20019B81D /* VersionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VersionManager.h; sourceTree = "<group>"; };
|
||||
84CD4A4C24877FA20019B81D /* VersionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VersionManager.m; sourceTree = "<group>"; };
|
||||
84CD4A55248781420019B81D /* Bridge-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridge-Header.h"; sourceTree = "<group>"; };
|
||||
84CD4A59248782720019B81D /* MainWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };
|
||||
84CD4A5B248782720019B81D /* ProgressViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ProgressViewController.xib; sourceTree = "<group>"; };
|
||||
@ -808,7 +803,6 @@
|
||||
children = (
|
||||
849C4F85209656D2005EB041 /* ru.lproj */,
|
||||
F8E6C4E81DCA3B7900F64426 /* Assets.xcassets */,
|
||||
844B495D228606B200EB60EF /* Main.storyboard */,
|
||||
F8E6C4EA1DCA3B7900F64426 /* LaunchScreen.storyboard */,
|
||||
F8E6C4ED1DCA3B7900F64426 /* Info.plist */,
|
||||
F8E6C4DC1DCA3B7900F64426 /* Supporting Files */,
|
||||
@ -825,8 +819,6 @@
|
||||
84CD4A55248781420019B81D /* Bridge-Header.h */,
|
||||
F8E6C4F31DCA3EA400F64426 /* ioswrap.h */,
|
||||
F8E6C4F41DCA3EA400F64426 /* ioswrap.m */,
|
||||
84CD4A4B24877FA20019B81D /* VersionManager.h */,
|
||||
84CD4A4C24877FA20019B81D /* VersionManager.m */,
|
||||
840E2F9E233410F90088E7F7 /* SDVersion.h */,
|
||||
842A808A2339174B00A89418 /* ads.h */,
|
||||
842A808B2339174C00A89418 /* ads.mm */,
|
||||
@ -1445,7 +1437,6 @@
|
||||
F8E6C4E91DCA3B7900F64426 /* Assets.xcassets in Resources */,
|
||||
849C4F86209656D3005EB041 /* ru.lproj in Resources */,
|
||||
F8E6C4EC1DCA3B7900F64426 /* LaunchScreen.storyboard in Resources */,
|
||||
844B495F228606B200EB60EF /* Main.storyboard in Resources */,
|
||||
F8E6C7E11DCA4EB300F64426 /* assets.zip in Resources */,
|
||||
F8E6C7E31DCA511700F64426 /* worlds.zip in Resources */,
|
||||
84B9C11824A4D82400016BCE /* ConsentAlertViewController.xib in Resources */,
|
||||
@ -1587,7 +1578,6 @@
|
||||
4B35A9B01EEDD15500274961 /* clientenvironment.cpp in Sources */,
|
||||
F8E6C7C21DCA428800F64426 /* timetaker.cpp in Sources */,
|
||||
F8E6C6211DCA3F9900F64426 /* hud.cpp in Sources */,
|
||||
84CD4A4D24877FA20019B81D /* VersionManager.m in Sources */,
|
||||
F8E6C6DF1DCA413A00F64426 /* clientpackethandler.cpp in Sources */,
|
||||
F8E6C6261DCA3F9900F64426 /* itemdef.cpp in Sources */,
|
||||
F8E6C61B1DCA3F9900F64426 /* guiKeyChangeMenu.cpp in Sources */,
|
||||
@ -1750,14 +1740,6 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
844B495D228606B200EB60EF /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
844B495E228606B200EB60EF /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F8E6C4EA1DCA3B7900F64426 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,2 +1,2 @@
|
||||
#import "VersionManager.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ioswrap.h"
|
||||
|
@ -24,6 +24,8 @@
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MetalCaptureEnabled</key>
|
||||
<false/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
@ -41,8 +43,6 @@
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
@ -28,6 +28,39 @@ private enum UnzipPath: Int {
|
||||
case library
|
||||
}
|
||||
|
||||
final class VersionManager {
|
||||
class func readVersion(withPath path: String?) -> UInt32 {
|
||||
let filename = URL(fileURLWithPath: path ?? "").appendingPathComponent("_version").path
|
||||
var content: String? = nil
|
||||
do {
|
||||
content = try String(contentsOfFile: filename, encoding: .ascii)
|
||||
} catch {
|
||||
Bugsnag.notifyError(error)
|
||||
return 0
|
||||
}
|
||||
return UInt32(Int(content ?? "") ?? 0)
|
||||
}
|
||||
|
||||
class func parseVersion() -> UInt32 {
|
||||
let revstr = Bundle.main.infoDictionary?["CFBundleVersion"] as? String
|
||||
let revision = UInt8(Int(revstr ?? "") ?? 0)
|
||||
let ret = UInt32(revision | (2 << 24))
|
||||
|
||||
print("App revision \(revstr ?? "") -> \(ret)")
|
||||
return ret
|
||||
}
|
||||
|
||||
class func writeVersion(withPath path: String?, ver: UInt32) {
|
||||
let filename = URL(fileURLWithPath: path ?? "").appendingPathComponent("_version").path
|
||||
let content = "\(ver)"
|
||||
do {
|
||||
try content.write(toFile: filename, atomically: false, encoding: .ascii)
|
||||
} catch {
|
||||
Bugsnag.notifyError(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class ZipManager: NSObject {
|
||||
private var assets: [Asset] = [.init(name: "assets", path: .library, versioned: true),
|
||||
.init(name: "worlds", path: .documents, versioned: false)]
|
||||
|
@ -1,9 +0,0 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface VersionManager : NSObject
|
||||
|
||||
+ (uint32_t) readVersionWithPath:(NSString *) path;
|
||||
+ (uint32_t) parseVersion;
|
||||
+ (void) writeVersionWithPath:(NSString *) path ver: (uint32_t) ver;
|
||||
|
||||
@end
|
@ -1,34 +0,0 @@
|
||||
#import "VersionManager.h"
|
||||
|
||||
@implementation VersionManager
|
||||
|
||||
+ (uint32_t) readVersionWithPath:(NSString *) path
|
||||
{
|
||||
NSString *filename = [path stringByAppendingPathComponent:@"_version"];
|
||||
NSError *error;
|
||||
NSString *content = [NSString stringWithContentsOfFile:filename encoding:NSASCIIStringEncoding error:&error];
|
||||
if (error)
|
||||
return 0;
|
||||
return [content intValue];
|
||||
}
|
||||
|
||||
+ (uint32_t) parseVersion
|
||||
{
|
||||
NSString *revstr = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"];
|
||||
uint8_t revision = [revstr intValue];
|
||||
|
||||
// compatibility with old versions, DON'T CHANGE
|
||||
uint32_t ret = revision | (2 << 24);
|
||||
|
||||
NSLog(@"App revision %@ -> %u", revstr, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ (void) writeVersionWithPath:(NSString *) path ver: (uint32_t) ver
|
||||
{
|
||||
NSString *filename = [path stringByAppendingPathComponent:@"_version"];
|
||||
NSString *content = [NSString stringWithFormat:@"%d", ver];
|
||||
[content writeToFile:filename atomically:NO encoding:NSASCIIStringEncoding error:nil];
|
||||
}
|
||||
|
||||
@end
|
@ -2,7 +2,7 @@
|
||||
|
||||
#if 0
|
||||
#define ADS
|
||||
#include "ads.h"
|
||||
#import "ads.h"
|
||||
#else
|
||||
#define ZIPPWD @"1" // zip password
|
||||
#define CrashliticsApiKey @"1" // crashlitics key
|
||||
|
@ -1,11 +1,9 @@
|
||||
#import "VersionManager.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ioswrap.h"
|
||||
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <Bugsnag/Bugsnag.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MultiCraft-Swift.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/* Initialization iOS Specific Things */
|
||||
void init_IOS_Settings()
|
||||
@ -85,7 +83,9 @@ void ioswrap_asset_refresh(void)
|
||||
NSString *destpath = [NSString stringWithUTF8String:buf];
|
||||
|
||||
// set asset version to 1, will be extracted next time
|
||||
[VersionManager writeVersionWithPath:destpath ver:1];
|
||||
NSString *filename = [destpath stringByAppendingPathComponent:@"_version"];
|
||||
NSString *content = [NSString stringWithFormat:@"%d", 1];
|
||||
[content writeToFile:filename atomically:NO encoding:NSASCIIStringEncoding error:nil];
|
||||
}
|
||||
|
||||
/* Get Scale Factor */
|
||||
|
@ -5,13 +5,12 @@ use_frameworks!
|
||||
def appodeal
|
||||
source 'https://github.com/appodeal/CocoaPods.git'
|
||||
|
||||
pod 'APDAdColonyAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDAppLovinAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDAppodealAdExchangeAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDMintegralAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDOguryAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDTapjoyAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDUnityAdapter', '2.7.2.1-Beta'
|
||||
pod 'APDAdColonyAdapter', '2.7.3.1-Beta'
|
||||
pod 'APDAppLovinAdapter', '2.7.3.1-Beta'
|
||||
pod 'APDAppodealAdExchangeAdapter', '2.7.3.1-Beta'
|
||||
pod 'APDMintegralAdapter', '2.7.3.1-Beta'
|
||||
pod 'APDTapjoyAdapter', '2.7.3.1-Beta'
|
||||
pod 'APDUnityAdapter', '2.7.3.1-Beta'
|
||||
end
|
||||
|
||||
target 'MultiCraft' do
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
. sdk.sh
|
||||
CURL_VERSION=7.71.1
|
||||
CURL_VERSION=7.72.0
|
||||
|
||||
if [ ! -d libcurl-src ]; then
|
||||
wget https://curl.haxx.se/download/curl-$CURL_VERSION.tar.gz
|
||||
|
Loading…
x
Reference in New Issue
Block a user