Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS SPM include files #89

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "CocoaAsyncSocket",
"repositoryURL": "https://github.com/ricobeck/CocoaAsyncSocket.git",
"state": {
"branch": null,
"revision": "9b2cfedabfa421523e5edd9f2409999ba567a427",
"version": null
}
}
]
},
"version": 1
}
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.2
// swift-tools-version:5.1
import PackageDescription

let package = Package(
Expand Down
Binary file added iOS/.DS_Store
Binary file not shown.
111 changes: 67 additions & 44 deletions iOS/Bagel.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "cocoaasyncsocket",
"kind" : "remoteSourceControl",
"location" : "https://github.com/robbiehanson/CocoaAsyncSocket",
"state" : {
"revision" : "dbdc00669c1ced63b27c3c5f052ee4d28f10150c",
"version" : "7.6.5"
}
}
],
"version" : 2
}
25 changes: 15 additions & 10 deletions iOS/Source/BagelUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

#import "BagelUtility.h"

#if TARGET_OS_IPHONE
@import UIKit;
#endif

@implementation BagelUtility

+ (NSString*)UUID
Expand All @@ -40,20 +44,21 @@ + (NSString*)deviceId

+ (NSString*)deviceName
{
return [UIDevice currentDevice].name;
#if TARGET_OS_IPHONE
return [[UIDevice currentDevice] name];
#elif TARGET_OS_MAC
return [[NSHost currentHost] localizedName];
#endif
}

+ (NSString*)deviceDescription
{
NSString* information = @"";

information = [UIDevice currentDevice].model;
information = [NSString stringWithFormat:@"%@ %@", information, [UIDevice currentDevice].systemName];
information = [NSString stringWithFormat:@"%@ %@", information, [UIDevice currentDevice].systemVersion];

return information;
#if TARGET_OS_IPHONE
return [NSString stringWithFormat: @"%@ %@ %@", [UIDevice currentDevice].systemName, [UIDevice currentDevice].systemName, [UIDevice currentDevice].systemVersion];
#elif TARGET_OS_MAC
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
return [NSString stringWithFormat: @"%@ %ld.%ld.%ld", [[NSHost currentHost] localizedName], version.majorVersion, version.minorVersion, version.patchVersion];
#endif
}

@end


20 changes: 6 additions & 14 deletions iOS/Source/Bagel.h → iOS/Source/include/Bagel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <UIKit/UIKit.h>

//! Project version number for Bagel.
FOUNDATION_EXPORT double BagelVersionNumber;

//! Project version string for Bagel.
FOUNDATION_EXPORT const unsigned char BagelVersionString[];

#import <Foundation/Foundation.h>

#import <Bagel/BagelBaseModel.h>
#import <Bagel/BagelCarrierDelegate.h>
#import <Bagel/BagelConfiguration.h>
#import <Bagel/BagelDeviceModel.h>
#import <Bagel/BagelProjectModel.h>
#import <Bagel/BagelUtility.h>
#import "BagelBaseModel.h"
#import "BagelCarrierDelegate.h"
#import "BagelConfiguration.h"
#import "BagelDeviceModel.h"
#import "BagelProjectModel.h"
#import "BagelUtility.h"

@interface Bagel : NSObject

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// THE SOFTWARE.

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface BagelUtility : NSObject

Expand Down
Binary file added mac/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions mac/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ SPEC CHECKSUMS:
macOSThemeKit: 651af12838675beac5547687226a270c294f8f84

PODFILE CHECKSUM: 6e39cacd4a77b09b958e2e6f8b405bbc2340dfc2

COCOAPODS: 1.8.4
COCOAPODS: 1.11.3