Skip to content

Commit

Permalink
Merge pull request #476 from CaiJingLong/merge-ios-and-macos
Browse files Browse the repository at this point in the history
Merge ios and macos code
  • Loading branch information
charisma98 committed Apr 14, 2021
2 parents dc815df + 1fd1774 commit 8475c2c
Show file tree
Hide file tree
Showing 82 changed files with 753 additions and 4,211 deletions.
5 changes: 3 additions & 2 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PODS:
- path_provider_macos (0.0.1):
- FlutterMacOS
- photo_manager (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
Expand All @@ -22,8 +23,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FlutterMacOS: 2f1b456c4d9436c4d4d13919bd3be8ef03ba6322
path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b
photo_manager: 4f4f808cb9801f1e961a913af4d41c641f79ba26
photo_manager: a8db3597a3b44e17ecb331fa099731c99b849496

PODFILE CHECKSUM: 29369daec14455706c464e51b7b84f58f287700e

COCOAPODS: 1.9.3
COCOAPODS: 1.10.1
2 changes: 2 additions & 0 deletions example/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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>NSPhotoLibraryUsageDescription</key>
<string>I will use photo library</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
55 changes: 28 additions & 27 deletions ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
.idea/
.vagrant/
.sconsign.dblite
.svn/

# OS X
.DS_Store
*.swp
profile

DerivedData/
# Xcode
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m

.generated/

*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3

!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

xcuserdata

xcuserdata/
*.xccheckout
profile
*.moved-aside

*.pyc
*sync/
Icon?
.tags*

/Flutter/Generated.xcconfig
DerivedData
*.hmap
*.ipa

# Bundler
.bundle

# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
# Pods/
Empty file removed ios/Assets/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions ios/Classes/ImageScannerPlugin.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import <Flutter/Flutter.h>
#import "PMImport.h"

@interface ImageScannerPlugin : NSObject <FlutterPlugin>
@property(nonatomic, strong) NSObject <FlutterPluginRegistrar> *registrar;
@end
@end
10 changes: 10 additions & 0 deletions ios/Classes/PMConverter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Created by jinglong cai on 2021/4/13.
//

#import <Foundation/Foundation.h>
#import "PMConvertProtocol.h"

@interface PMConverter : NSObject <PMConvertProtocol>

@end
16 changes: 16 additions & 0 deletions ios/Classes/PMConverter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Created by jinglong cai on 2021/4/13.
//

#import "PMConverter.h"
#import "PMImport.h"

@implementation PMConverter {

}

- (id)convertData:(NSData *)data {
return [FlutterStandardTypedData typedDataWithBytes:data];
}

@end
18 changes: 18 additions & 0 deletions ios/Classes/PMImport.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// PMImport.h
// Pods
//
// Created by jinglong cai on 2021/4/13.
//
//

#ifndef PMImport_h
#define PMImport_h

#if TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#elif TARGET_OS_IOS
#import <Flutter/Flutter.h>
#endif

#endif /* PMImport_h */
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import "PMImport.h"

@protocol FlutterPluginRegistrar;

Expand All @@ -20,4 +20,4 @@

- (BOOL)isNotifying;

@end
@end
File renamed without changes.
4 changes: 2 additions & 2 deletions ios/Classes/core/PMPlugin.h → ios/Classes/PMPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import "PMImport.h"

@class PMManager;
@class PMNotificationManager;
Expand All @@ -13,4 +13,4 @@
@property(nonatomic, strong) PMNotificationManager *notificationManager;
- (void)registerPlugin:(NSObject <FlutterPluginRegistrar> *)registrar;

@end
@end
Loading

0 comments on commit 8475c2c

Please sign in to comment.